#include "ActionAbout.h"
#include "Observation.h"
#include "LogCat.h"
#include <random>


ActionAbout::ActionAbout()
{
}


ActionAbout::~ActionAbout()
{
}

int ActionAbout::actionGrabber()
{

	return 0;
}

int ActionAbout::actionGrabberOffLine(const vector<Pose3D>& ground_truth)
{
	Pose3D pose;
	if (ground_truth.size() == 0)
		return -1;
	for (auto &p : ground_truth) {
		pose.x = p.x;
		pose.y = p.y;
		pose.z= p.z;
		pose.yaw = p.yaw;
		pose.pitch = p.pitch;
		pose.roll = p.roll;
		m_action.push_back(pose);
		LogCat::h("ActionAbout","actionGrabberOffLine", pose);
	}
	return 0;
}

Pose3D ActionAbout::getActionAddition(const size_t index, int interval)
{
	if (index >= 1) {
		return Pose3D(m_action[index] - m_action[index - interval]);
	}
	else {
		return Pose3D(m_action[0]);
	}
	return Pose3D();
}

const Pose3D ActionAbout::getLastPose()
{
	return Pose3D();
}

const Pose3D& ActionAbout::get(size_t index)
{
	if (index <= m_action.size()) {
		return m_action[index];
	}
	return Pose3D();
}


void ActionAbout::insert(Pose3D & pose)
{
}

void ActionAbout::eraseByIndex(const size_t & index)
{
}

size_t ActionAbout::size()
{
	return size_t();
}

void ActionAbout::clear()
{
}


